home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////////////////////////////
- //
- // Source file for BeeperUI
- //
- // This file generated by a BuilderXcessory. DO NOT EDIT THIS FILE.
- // TO ADD EXTENSIONS TO THIS CLASS, USE THE BUILDER XCESSORY
- // TO CREATE A SUBCLASS.
- //
- // This class is a user interface "component", as described
- // in "Object-Oriented Programming with C++ and OSF/Motif",
- // by Douglas Young, Prentice Hall, 1992. ISBN 0-13-630252-1
- //
- //
- /////////////////////////////////////////////////////////////
-
-
- #include "BeeperUI.h" // Generated header file for this class
- #include <Xm/Form.h>
- #include <Xm/Label.h>
- #include <Xm/PushB.h>
- #ifndef XmNrow
- #define XmNrow "row"
- #endif
- #ifndef XmNcolumn
- #define XmNcolumn "column"
- #endif
-
-
-
-
-
- // These are default resources for widgets in objects of this class
- // All resources will be prepended by *<name> at instantiation,
- // where <name> is the name of the specific instance, as well as the
- // name of the baseWidget. These are only defaults, and may be overriden
- // in a resource file by providing a more specific resource name
-
- String BeeperUI::_defaultBeeperUIResources[] = {
- NULL
- };
-
- BeeperUI::BeeperUI(const char *name, Widget parent) :
- VkComponent(name)
- {
- Arg args[10];
- Cardinal count;
-
- count = 0;
-
- // Load any class-defaulted resources for this object
-
- setDefaultResources(parent, _defaultBeeperUIResources );
-
-
-
- // Create an unmanaged widget as the top of the widget hierarchy
-
- _baseWidget = _beeper= XtVaCreateWidget ( _name,
- xmFormWidgetClass,
- parent,
- XmNresizePolicy, XmRESIZE_GROW,
- NULL);
-
- // install a callback to guard against unexpected widget destruction
-
- installDestroyHandler();
-
-
- // Create widgets used in this component
- // All variables are data members of this class
-
- _pushButton = XtVaCreateManagedWidget ( "pushButton",
- xmPushButtonWidgetClass,
- _w,
- XmNborderWidth, 0,
- XmNtopAttachment, XmATTACH_WIDGET,
- XmNbottomAttachment, XmATTACH_FORM,
- XmNleftAttachment, XmATTACH_FORM,
- XmNrightAttachment, XmATTACH_FORM,
- XmNtopOffset, 10,
- XmNbottomOffset, 60,
- XmNleftOffset, 50,
- XmNrightOffset, 50,
- NULL);
-
- XtAddCallback ( _pushButton,
- XmNactivateCallback,
- &BeeperUI::beepCallback,
- (XtPointer) this );
-
-
- _label = XtVaCreateManagedWidget ( "label",
- xmLabelWidgetClass,
- _w,
- XmNborderWidth, 0,
- XmNrecomputeSize, True,
- XmNtopAttachment, XmATTACH_FORM,
- XmNbottomAttachment, XmATTACH_NONE,
- XmNleftAttachment, XmATTACH_FORM,
- XmNrightAttachment, XmATTACH_FORM,
- XmNtopOffset, 20,
- XmNbottomOffset, 0,
- XmNleftOffset, 61,
- XmNrightOffset, 62,
- NULL);
-
-
- XtVaSetValues ( _pushButton,
- XmNtopWidget, _label,
- NULL);
- }
-
- BeeperUI::~BeeperUI()
- {
- // Empty Destructor. Base class destroys widgets
- }
-
- const char * BeeperUI::className() // classname
- {
- return ("BeeperUI");
- }
-
- void BeeperUI::beepCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- BeeperUI* obj = (BeeperUI *) clientData;
-
- obj->beep(w, callData);
- }
-
-
-
- void BeeperUI::beep(Widget, XtPointer)
- {
- // Empty virtual function. Called from beepCallback.
- // Derived classes can override.
- }
-
-
-
-